home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / etc_130s.zip / PLAYWAVE.ETC < prev    next >
Text File  |  1993-03-13  |  928b  |  44 lines

  1. ; This demo batch file plays all wave files in the Windows directory,
  2. ; displaying a window which shows the name of each file as it is played.
  3.  
  4. ; This part hides all open windows.
  5. TitleFill 100
  6. #B = Lines + 99
  7. For #A = 100 to #B
  8. Hide $[#A]
  9. Next #A
  10.  
  11. ; Change to the Windows directory, to make things easier...
  12. CD WinDirectory
  13.  
  14. ; Create a window at (100, 100) whose size is (220, 30), and place its
  15. ; handle in @A
  16. CreateWindow @A 100, 100, 220, 30
  17.  
  18. ; Get the names of all .WAV files
  19. FileFill "*.WAV", 200
  20. #D = Lines + 199
  21.  
  22. ; Start the play loop
  23. For #C = 200 to #D
  24.  
  25. ; White-out the window
  26. PaintWindow @A, White
  27.  
  28. ; Show which file we're playing
  29. WriteText @A, "Now playing " & $[#C] & ".", 10, 7
  30.  
  31. ; Play the file
  32. PlaySound $[#C]
  33.  
  34. ; And repeat until done
  35. Next
  36.  
  37. ; Get rid of the window we created
  38. DestroyWindow @A
  39.  
  40. ; This part unhides all hidden windows.
  41. For #A = 100 to #B
  42. Unhide $[#A]
  43. Next
  44.